<%@ page language="java" import="java.util.*,com.opensymphony.xwork2.ActionContext;" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>test</title>
	<script src="resource/js/util.js" type="text/javascript" />	
	<script language='javascript'> 
	function showItem(many, one){
		var sexkub=document.getElementById(many);
 		var sex=document.getElementById(one).value.trim();
		for(var h=0;h<sexkub.options.length;h++){
   			if(sexkub.options[h].value==sex){
    		 	sexkub.options[h].selected=true;  
    		 	break;
    		}
		}
	}
	$('#test').click(function(){
		$(this).attr('src',"resource/img/boy.jpg");
	});
		$('#submit').click(function(){
			return duoduoNavTabSearch($('#form'),'card/GenerateCardAction','我的名片');
		});	
		
		$('#test').click(function(){
			$(this).attr('src', 'resource/img/boy.jpg');
		});
		

    </script> 
	</head>
	<body>
		<form method="post" action="card/GenerateCardAction" class="pageForm required-validate"
			id="form">
<table border="1" width="100%" height="100%">
    <tr >
	<td width="30%" height="80%">
        <table width="100%" height="100%" border="1">
            <tr width="100px" height="50px">
                <td height="10%" align="center">名片正面图片</td>
            </tr>
            <tr>

                <td height="40%" align="center"><img id="test" style="width:300px; height:200px" src="resource/img/baby.jpg" /></td>

            </tr>
            <tr>
            	<td height="10%" align="center">名片反面图片</td>
            </tr>
            <tr>
                 <td height="40%" align="center"><img id="test"  width="300" height="200" src="resource/img/baby.jpg"/></td>
            </tr> 		 
        </table>
	</td>
  	<td width="70%">
        <table width="100%" height="90%" border="0">
            <tr>
                <td>
                
                <div class="tabs" currentIndex="0" eventType="click">
				<div class="tabsHeader">
					<div class="tabsHeaderContent">
						<ul>
							<li>
								<a href="javascript:;"><span>名片信息</span> </a>
							</li>
							<li>
								<a href="javascript:;"><span>住址（1）</span> </a>
							</li>
							<li>
								<a href="javascript:;"><span>住址（2）</span> </a>
							</li>
							<li>
								<a href="javascript:;"><span>个人信息</span> </a>
							</li>
							<li>
								<a href="javascript:;"><span>公司信息</span> </a>
							</li>
							<li>
								<a href="javascript:;"><span>权限设置</span> </a>
							</li>
							<li>
								<a href="javascript:;"><span>TEST</span> </a>
							</li>
						</ul>
					</div>
				</div>
				<div class="tabsContent" style="height: 80%;">
					<!-- 选项卡面板1 -->
					<div layouth="97" class="pageFormContent"
						style="height: 244px; overflow: auto;">
						<h2 class="contentTitle">
							名片基本信息
						</h2>
	
						
						<dl class="nowrap">
							<dt>
								名片正面路径：
							</dt>
							<dd>
								<input type="file" class="valid">
								<input type="text" name="trnMid.midfront" value="${trnMid.midfront}">
							</dd>
						</dl>
						<dl class="nowrap">
							<dt>
								名片反面路径：
							</dt>
							<dd>
								<input type="file" class="valid">
								<input type="hidden" name="trnMid.midfront" value="${trnMid.midfront}">
							</dd>
						</dl>
						
						<%
						ActionContext ctx = ActionContext.getContext();
						String userid = String.valueOf((ctx.getSession().get("userid")));
						%>
						<dl class="nowrap">
							<dt>
								创建者（~~测试用~~）：
							</dt>
							<dd>
								<input type="text" size="30" class="required textInput" name="trnMid.crtusr" value="<%=userid %>">
							</dd>
						</dl>
						<dl class="nowrap">
							<dt>
								公司名称：
							</dt>
							<dd>
								<input type="text" alt="请输入公司名称"  size="30"
												class="required textInput" name="trnNc.comjnam" value="${target.comjnam}">
								<label for="trnNc.comjnam" class="alt"
									style="width: 188px; top: 5px; left: 130px; opacity: 1; display: none;">
									请输入公司名称
								</label>
							</dd>
						</dl>
						<dl class="nowrap">
							<dt>
								公司名称（拼音）：
							</dt>
							<dd>
								<input type="text" size="30" class="textInput" name="trnNc.comjnamkn" value="${target.comjnamkn}">
							</dd>
						</dl>
			 			<dl class="nowrap">
							<dt>
								公司名称（英文）：
							</dt>
							<dd>
								<input type="text" size="30" class="textInput" name="trnNc.comenam" value="${target.comenam}">
							</dd>
						</dl>
			 			<dl class="nowrap">
							<dt>
								部门名称：
							</dt>
							<dd>
								<input type="text" size="30" class="required textInput" name="trnNc.postnam" value="${target.postnam}">
							</dd>
						</dl>
			 			<dl class="nowrap">
							<dt>
								职务：
							</dt>
							<dd>
								<input type="text" size="30" class="required textInput" name="trnNc.offposi" value="${target.offposi}">
							</dd>
						</dl>
			 			
						<dl class="nowrap">
							<dt>
								姓名：
							</dt>
							<dd>
								<table>
									<tr>
									<td><input type="text" size="30" class="required textInput" name="trnNc.firstnam" value="${target.firstnam}"></td>	
									<td><input type="text" size="30" class="required textInput" name="trnNc.secdnam" value="${target.secdnam}"></td></tr></table>
							</dd>
						</dl>
						<dl class="nowrap">
							<dt>
								姓名（拼音）：
							</dt>
							<dd>
							<table>
									<tr>
									<td><input type="text" size="30" class="textInput"  name="trnNc.firstnamkn" value="${target.firstnamkn}"></td>	
									<td><input type="text" size="30" class="textInput" name="trnNc.secdnamkn" value="${target.secdnamkn}"></td></tr></table>
								
							</dd>
						</dl>
					</div>
					<!-- 选项卡面板2 -->
					<div layouth="97" class="pageFormContent"
						style="height: 244px; overflow: auto;">
						<h2 class="contentTitle">
							住址1
						</h2>
						<dl class="nowrap">
							<dt>
								邮政编码：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.postalnum1" class="textInput" value="${target.postalnum1}">
							</dd>
						</dl>
						<dl class="nowrap">
							<dt>
								住址：
							</dt>
							<dd>
								<table>
									<tr>
										<td>省份：</td><td><input type="text" size="10" name="trnNc.adsadmindiv1" class="textInput" value="${target.adsadmindiv1}"></td>
										<td>市：</td><td><input type="text" size="10" name="trnNc.adstown1" class="textInput" value="${target.adstown1}"></td>
										<td>区/县：</td><td><input type="text" size="10" name="trnNc.adsstrtnum1" class="textInput" value="${target.adsstrtnum1}"></td>
									</tr>
									<tr>
									<td>地址：</td>
									<td colspan="6"><input type="text" size="46" name="trnNc.adsbuild1" class="textInput" value="${target.adsbuild1}">
									</td>
									</tr>
								</table>
							</dd>
						</dl>

						<dl class="nowrap">
							<dt>
								电话1：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.telfist1" class="textInput" value="${target.telfist1}">
							</dd>
						</dl>
						<dl class="nowrap">
							<dt>
								电话2：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.telsecd1" class="textInput" value="${target.telsecd1}">
							</dd>
						</dl>
						<div class="divider"></div>

						<dl class="nowrap">
							<dt>
								手机：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.mobiletel1" class="textInput" value="${target.mobiletel1}">
							</dd>
						</dl>

						<div class="divider"></div>

						<dl class="nowrap">
							<dt>
								传真：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.fax1" class="textInput" value="${target.fax1}">
							</dd>
						</dl>
						<dl class="nowrap">
							<dt>
								电子邮件：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.email1" class="textInput" value="${target.email1}">
							</dd>
						</dl>

						<div class="divider"></div>
						<dl class="nowrap">
							<dt>
								URL：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.url1" class="textInput" value="${target.url1}">
							</dd>
						</dl>						
					</div>

					<!-- 选项卡面板3 -->
					<div layouth="97" class="pageFormContent"
						style="height: 244px; overflow: auto;">
						<h2 class="contentTitle">
							住址2
						</h2>

						<dl class="nowrap">
							<dt>
								邮政编码：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.postalnum2" class="textInput" value="${target.postalnum2}">
							</dd>
						</dl>
						<dl class="nowrap">
							<dt>
								住址：
							</dt>
							<dd>
								<table>
									<tr>
										<td>省份：</td><td><input type="text" size="10" name="trnNc.adsadmindiv2" class="textInput" value="${target.adsadmindiv2}"></td>
										<td>市：</td><td><input type="text" size="10" name="trnNc.adstown2" class="textInput" value="${target.adstown2}"></td>
										<td>区/县：</td><td><input type="text" size="10" name="trnNc.adsstrtnum2" class="textInput" value="${target.adsstrtnum2}"></td>
									</tr>
									<tr>
									<td>地址：</td>
									<td colspan="6"><input type="text" size="46" name="trnNc.adsbuild2" class="textInput" value="${target.adsbuild2}">
									</td>
									</tr>
								</table>
							</dd>
						</dl>
						<dl class="nowrap">
							<dt>
								电话1：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.telfist2" class="textInput" value="${target.telfist2}" alt="请输入您的电话" />		
							</dd>
						</dl>
						<dl class="nowrap">
							<dt>
								电话2：
							</dt>
							<dd>
								<input type="text" name="trnNc.telsecd2" class="textInput" value="${target.telsecd2}" size="30" alt="请输入您的电话" />		
							</dd>
						</dl>
						<div class="divider"></div>

						<dl class="nowrap">
							<dt>
								手机：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.mobiletel2" value="${target.mobiletel2}" class="textInput">
							</dd>
						</dl>

						<div class="divider"></div>

						<dl class="nowrap">
							<dt>
								传真：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.fax2" class="textInput" value="${target.fax2}">
							</dd>
						</dl>
						<dl class="nowrap">
							<dt>
								电子邮件：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.email2" class="textInput" value="${target.email2}">
							</dd>
						</dl>

						<div class="divider"></div>
						<dl class="nowrap">
							<dt>
								URL：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.url2" class="textInput" value="${target.url2}">
							</dd>
						</dl>
					</div>
					<!-- 选项卡面板4 -->
					<div layouth="97" class="pageFormContent"
						style="height: 244px; overflow: auto;">
						<h2 class="contentTitle">
							个人信息
						</h2>
<script language='javascript'> 
	showItem('trnNc.sexkub', 'sex');
</script> 
						<dl class="nowrap">
							<dt>
								性别：
							</dt>
							<dd>
							<input type="hidden" id="sex" value="${target.sexkub}"/>
							<select class="textInput" name="trnNc.sexkub" id="trnNc.sexkub">
								<option value="">
									==请选择==
								</option>
								<option value="1">
									男
								</option>
								<option value="0">
									女
								</option>			
							</select>
							<span class="unit">性</span>
							</dd>
						</dl>
<script language='javascript'> 
	showItem('trnNc.blodkub', 'bloodtype');
</script> 
						<dl class="nowrap">
							<dt>
								血型：
							</dt>
							<dd>
							<input type="hidden" id="bloodtype" value="${target.blodkub}"/>
							<select class="textInput" name="trnNc.blodkub" id="trnNc.blodkub">
								<option value="">
									==请选择==
								</option>
								<option value="1">
									A
								</option>
								<option value="2">
									B
								</option>
								<option value="3">
									AB
								</option>
								<option value="4">
									O
								</option>
								<option value="5">
									不明
								</option>
							</select>
							<span class="unit">型</span>
							</dd>
						</dl>
						<dl class="nowrap">
							<dt>
								职业：
							</dt>
							
							<dd>
							<input type="text" name="trnNc.jobkub" size="30" class="textInput" value="${target.jobkub}"  />			
								<input type="hidden" id="jobkub" value="${target.jobkub}"/>
								<select class="textInput" name="trnNc.jobkub" id="trnNc.jobkub">
									<option value="">
										==请选择==
									</option>		
									<option value="1">
										营业
									</option> 
									<option value="2">
										技术
									</option> 
									<option value="3">
										宣传
									</option> 
									<option value="4">
										创作
									</option> 
									<option value="5">
										编辑
									</option> 
									<option value="6">
										销售
									</option> 
									<option value="7">
										事务人员
									</option> 
									<option value="8">
										会计师
									</option> 
									<option value="9">
										顾问
									</option> 
									<option value="10">
										分析师
									</option> 
									<option value="10">
										教职员
									</option> 
									<option value="12">
										人事管理
									</option> 
									<option value="13">
										市场
									</option> 
									<option value="14">
										公务员
									</option> 
									<option value="15">
										其他
									</option> 
								</select>
							
							</dd>
						</dl>
						
						<dl class="nowrap">
							<dt>
								出生日期：
							</dt>
							<dd>
							
							<table>
								<tr>
								<td>
<script language='javascript'> 
	showItem('trnNc.birthdayy', 'birthdayy');
</script>
							<input type="hidden" id="birthdayy" value="${target.birthdayy}"/>
							<select class="textInput" name="trnNc.birthdayy" id="trnNc.birthdayy">
								<option value="">
									==请选择==
								</option>
								<%for(int i = 1920; i < 2013; i++){ %>
								<option value="<%=i%>">
									<%=i%>
								</option>
								<%} %>	 
							</select>
							<span class="unit">年</span></td>
							<td>
<script language='javascript'> 
	showItem('trnNc.birthdaym', 'birthdaym');
</script>
							<input type="hidden" id="birthdaym" value="${target.birthdaym}"/>
							<select class="textInput" name="trnNc.birthdaym" id="trnNc.birthdaym">
								<option value="">
									==请选择==
								</option>
								<%for(int i = 1; i < 13; i++){ %>
								<option value="<%=i%>">
									<%=i%>
								</option>
								<%} %>	 	
							</select>
							<span class="unit">月</span></td>
							<td>
<script language='javascript'> 
	showItem('trnNc.birthdayd', 'birthdayd');
</script>
							<input type="hidden" id="birthdayd" value="${target.birthdayd}"/>
							<select class="textInput" name="trnNc.birthdayd" id="trnNc.birthdayd">
								<option value="">
									==请选择==
								</option>
								<%for(int i = 1; i <= 31; i++){ %>
								<option value="<%=i%>">
									<%=i%>
								</option>
								<%} %>	 	
							</select>
							<span class="unit">日</span></td>
								</tr>
							</table>
							</dd>	 
						</dl>
						
						<dl class="nowrap">
							<dt>
								出生日期：
							</dt>
							<dd>
								<input type="text" size="30" class="date textInput" name="" value="">
								<a href="javascript:;" class="inputDateButton">选择</a>
							</dd>
						</dl>
			 
						<dl class="nowrap">
							<dt>
								备忘录：
							</dt>
							<dd>
								<textarea name="trnNc.memo" cols="80" rows="3" ><%="${target.memo}" %></textarea>
							</dd>
						</dl>
			 
					</div>
					<!-- 选项卡面板5 -->
					<div class="pageFormContent nowrap" layoutH="97">
						<h2 class="contentTitle">
							公司信息
						</h2>
						<dl>
							<dt>
								所属行业名：
							</dt>
							<dd>
								<input type="text" name="trnNc.bustypnam" size="30" class="textInput" value="${target.bustypnam}" />
							</dd>
						</dl>
						
						<dl>
							<dt>
								成立日期：
							</dt>
							<dd>
								<input type="text" size="30" class="date textInput"
													name="trnNc.fondym" value="">
								<a href="javascript:;" class="inputDateButton">选择</a>
							</dd>
						</dl>
				
						<dl>
							<dt>
								资金数：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.capital" class="number" value="${target.capital}" />
							</dd>
						</dl>
						<dl>
							<dt>
								员工数：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.emplonum" class="digits" value="${target.emplonum}" />
							</dd>
						</dl>
						<dl>
							<dt>
								证券代码（数字）：
							</dt>
							<dd>
								<input type="text" alt="请输入数字" size="30" class="digits textInput"
															name="trnNc.bondcode" id="code" value="${target.bondcode}">
								<label for="code" class="alt"
								style="width: 188px; top: 5px; left: 130px; opacity: 1;">
								请输入数字
							</label>
							</dd>
						</dl>
						
						<dl class="nowrap">
							<dt>
								法人代表姓名：
							</dt>
							<dd>
								<input type="text" size="30" name="trnNc.reptannam" class="textInput" value="${target.reptannam}">
							</dd>
						</dl>
						 
						<div class="divider"></div>
					</div>
					<!-- 选项卡面板6 -->
					<div class="pageFormContent nowrap" layoutH="97">
						<h2 class="contentTitle">
							权限设置
						</h2>
						
						<dl class="nowrap">
							<dt>
								公开：
							</dt>
							<dd>
 
							<input type="hidden" id="sharekub" value="${trnMid.sharekub}"/>
							<select class="textInput" name="trnMid.sharekub" width="30">
								<option value="">
									==请选择==
								</option>
								<option value="0">
									共有
								</option>
								<option value="1">
									非公有
								</option>			
							</select>
							</dd>
						</dl>
						<dl class="nowrap">
							<dt>
								重要度：
							</dt>
							<dd>

<%
	 String[] imptant = {"==请选择==","非常重要","比较重要","一般重要","不重要"};
%>
							<input type="hidden" id="imptantkub" value="${target.imptantkub}"/>
							<select class="textInput" name="trnNc.imptantkub" id="trnNc.imptantkub">
								<%for(int i=0; i<imptant.length; i++){ 
									if("${target.imptantkub}".equals(String.valueOf(i))){%>
									<option value="<%=i%>" selected="selected"><%=imptant[i] %></option>
									<%}else{ %>
									<option value="<%=i%>"> <%=imptant[i] %></option>
								<%}} %>
							</select>
							</dd>
						</dl>
						
						<dl class="nowrap">
							<dt>
								关系：
							</dt>
							<dd>
<script language='javascript'> 
	showItem('trnNc.relationkub', 'relationkub');
</script> 

<%
	 String[] relation = {"==请选择==","关键角色","合作伙伴","客户","供应商","交易方","支援方","承建商","合约预定人","家人","同事",
	 					  "朋友","前辈/上司","后辈","外包方","协力方","其他","TEST"};
%>
							<input type="hidden" id="relationkub" value="${target.relationkub}"/>
							<select class="textInput" name="trnNc.relationkub" id="trnNc.relationkub">
								<%for(int i=0; i<relation.length; i++){ %>
									<option value="<%=i%>">
										<%=relation[i] %>
									</option>
								<%} %>
							</select>
							</dd>
						</dl>
			 
						<div class="divider"></div>
					</div>
					
					<div class="tabsFooter">
						<div class="tabsFooterContent"></div>
					</div>
				</div>
			</div>
  
                </td>
            </tr>
        </table></td>
    </tr>
	<tr><td colspan="2" align="right"  height="20%">
	<div class="formBar">
	
				<ul>
				<s:if test='isScanFlag=="false"'>
					<li>
						<label>
							<input type="checkbox" value="0" name="trnMid.owbusflg">
							设为自己的名片
						</label>
					</li>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit" id="submit">
									生成名片
								</button>
							</div>
						</div>
					</li>
					
					<li>
						<div class="button">
							<div class="buttonContent">
								<button type="reset" class="close">
									重置
								</button>
							</div>
						</div>
					</li>
					</s:if>
					<li>
						<div class="button">
							<div class="buttonContent">
								<button type="button" class="close">
									取消
								</button>
							</div>
						</div>
					</li>
				</ul>
			</div></td></tr>
</table>			
			
			
			
						
			
			
	
		</form>

	</body>
</html>